<?php
	error_reporting( E_ALL );
	require_once( 'assets/defines.php' );
	require_once( 'assets/lang/english.php' );


	$isWin         		= (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN');
	$actmsg_MESSAGE = '';
	$dashbrd_MESSAGE = '';
	$msgctr_MESSAGE = '';
	$msgctr_ERROR = '';
	$msgctr_WARNING = '';
	$msgctr_NOTICE = '';
	$status_CFGSTAT = '';
	$status_DEVSTAT = '';
?>

<?php


	// Must be Joomla! 1.5.x
	if (file_exists( '../includes/joomla/version.php' )) {

		// Set flag that this is a parent file
		define( '_JEXEC', 1 );

			require_once( '../includes/joomla/version.php' );

			$_VERSION				= new jVersion();
			$APPLICATION_product	= $_VERSION->PRODUCT;			
			$APPLICATION_version	= $_VERSION->RELEASE;
			$APPLICATION_devstatus	= $_VERSION->DEV_STATUS;
			$APPLICATION_devlevel	= $_VERSION->DEV_LEVEL;
			$APPLICATION_build		= $_VERSION->BUILD;
			$APPLICATION_codename	= $_VERSION->CODENAME;
			$APPLICATION_reldate	= $_VERSION->RELDATE;
			$APPLICATION_reltime	= $_VERSION->RELTIME;
			$APPLICATION_copyright	= $_VERSION->COPYRIGHT;

			$ts_VER					= _ts_VER ."". _jts_REL;
			$ts_STA					= _jts_STA;

			// Find the configuration file
			$cfg_FILE = '../configuration.php';
				if ( file_exists( $cfg_FILE ) ) {

				require_once( $cfg_FILE );
				$discovered_CFG = '1';

				// configuration file not found... Pre-Install check assumed...	
				} else {
					$discovered_CFG = '0';
					$discovered_APP = 'preinstall';
					}


			// Must be Joomla 1.0 or Mambo 4.x
			} else if ( file_exists( '../includes/version.php' ) ) {

				// Set flag that this is a parent file
				define( '_VALID_MOS', 1 );

					require_once( '../includes/version.php' );

						// Must be Joomla! 1.x
						if ( file_exists( '../includes/joomla.php' ) ) {
				
							$_VERSION				= new joomlaVersion();

							$ts_VER					= _ts_VER .''. _jts_REL;
							$ts_STA					= _jts_STA;

							// Must be Mambo 4.x
							} else {				

								$_VERSION				= new version();

								$ts_VER					= _ts_VER .''. _mts_REL;
								$ts_STA					= _mts_STA;

								}

						$APPLICATION_product	= $_VERSION->PRODUCT;			
						$APPLICATION_version	= $_VERSION->RELEASE;
						$APPLICATION_devstatus	= $_VERSION->DEV_STATUS;
						$APPLICATION_devlevel	= $_VERSION->DEV_LEVEL;
						$APPLICATION_build		= $_VERSION->BUILD;
						$APPLICATION_codename	= $_VERSION->CODENAME;
						$APPLICATION_reldate	= $_VERSION->RELDATE;
						$APPLICATION_reltime	= $_VERSION->RELTIME;
						$APPLICATION_copyright	= $_VERSION->COPYRIGHT;

						// Find the configuration file
						$cfg_FILE = '../configuration.php';
						if ( file_exists( $cfg_FILE ) ) {

						require_once( $cfg_FILE );
						$discovered_CFG = '1';

						// configuration file not found... Pre-Install check assumed...	
						} else {
							$discovered_CFG = '0';
							$discovered_APP = 'preinstall';
							}

					// Must be Drupal 5 or 6
					} else if ( file_exists( '../modules/system/system.info' ) ) {

						$content = file_get_contents( '../modules/system/system.info', FILE_TEXT);


//				        preg_match('#name = (.*)#', $content, $drupal_NAME); 
				        preg_match('#package = (.*)#', $content, $drupal_STATUS);
				        preg_match('#core = (.*)#', $content, $drupal_BUILD);
				        preg_match('#project = "(.*)"#', $content, $drupal_NAME); 
				        preg_match('#version = "(.*)"#', $content, $drupal_VERSION);
				        preg_match('#datestamp = "(.*)"#', $content, $drupal_RELDATE);

  						$APPLICATION_product 	= $drupal_NAME[1];
  						$APPLICATION_version 	= $drupal_VERSION[1];
						$APPLICATION_devstatus 	= $drupal_STATUS[1];
						$APPLICATION_devlevel 	= '';

						if ( $drupal_BUILD[1] != '' ) {
							$APPLICATION_build 		= $drupal_BUILD[1];
							} else {
								$APPLICATION_build 		= 'N/A';							
								}

						$APPLICATION_codename 	= 'N/A';
  						$APPLICATION_reldate 	= date ( 'j F, Y', $drupal_RELDATE[1] );
						$APPLICATION_reltime 	= 'N/A';
						$APPLICATION_copyright 	= 'N/A';

						$ts_VER = _ts_VER .''. _dts_REL;
						$ts_STA = _dts_STA;


						$cfg_FILE = '../sites/default/settings.php';
						if ( file_exists( $cfg_FILE ) ) {

						require_once( $cfg_FILE );
						$discovered_CFG = '1';

						// configuration file not found... Pre-Install check assumed...	
						} else {
							$discovered_CFG = '0';
							$discovered_APP = 'preinstall';
							}

						// Must be Wordpress 2.x
						} else if ( file_exists( '../wp-includes/version.php' ) ) {
					
							require_once( '../wp-includes/version.php' );

							$content = file_get_contents( '../wp-includes/version.php', FILE_TEXT);
					        preg_match('#The\s(.*) version string#', $content, $wordpress_NAME);

							$APPLICATION_product 	= substr( $wordpress_NAME[1], 0, 9 );
							$APPLICATION_version 	= $wp_version;
							$APPLICATION_devstatus 	= 'N/A';
							$APPLICATION_devlevel 	= 'N/A';
							$APPLICATION_build 		= 'DB Version '. $wp_db_version;
							$APPLICATION_codename 	= 'N/A';
							$APPLICATION_reldate 	= 'N/A';
							$APPLICATION_reltime 	= 'N/A';
							$APPLICATION_copyright 	= 'N/A';

							$ts_VER = _ts_VER .''. _wts_REL;
							$ts_STA = _wts_STA;
						

							$cfg_FILE = '../wp-config.php';
							if ( file_exists( $cfg_FILE ) ) {

//							require_once( $cfg_FILE );
							$discovered_CFG = '1';

							// configuration file not found... Pre-Install check assumed...	
							} else {
								$discovered_CFG = '0';
								$discovered_APP = 'preinstall';
								}


							// Must be ModX =< v6
							} else if ( file_exists( '../manager/includes/version.inc.php' ) ) {
					
								require_once( '../manager/includes/version.inc.php' );

								$APPLICATION_product 	= substr( $full_appname, 0, 4 );
								$APPLICATION_version 	= $version .' - '. $small_version;
								$APPLICATION_devstatus 	= 'N/A';
								$APPLICATION_devlevel 	= $patch_level;
								$APPLICATION_build 		= $code_name;
								$APPLICATION_codename 	= 'N/A';
								$APPLICATION_reldate 	= 'N/A';
								$APPLICATION_reltime 	= 'N/A';
								$APPLICATION_copyright 	= 'N/A';

								$ts_VER = _ts_VER .''. _mxts_REL;
								$ts_STA = _mxts_STA;

								$cfg_FILE = '../manager/includes/config.inc.php';						
								if ( file_exists( $cfg_FILE ) ) {

								require_once( $cfg_FILE );
								$discovered_CFG = '1';

								// configuration file not found... Pre-Install check assumed...	
								} else {
									$discovered_CFG = '0';
									$discovered_APP = 'preinstall';
									}

								// Must be ModX =< v6
								} else if ( file_exists( '../core/config/version.inc.php' ) ) {

									require_once( '../core/config/version.inc.php' );

								$APPLICATION_product 	= substr( $v['full_appname'], 0, 4 );
								$APPLICATION_version 	= $v['version'] .'.'. $v['major_version'] .'.'. $v['minor_version'];
								$APPLICATION_devstatus 	= 'N/A';
								$APPLICATION_devlevel 	= $v['patch_level'];
								$APPLICATION_build 		= $v['code_name'];
								$APPLICATION_codename 	= 'N/A';
								$APPLICATION_reldate 	= 'N/A';
								$APPLICATION_reltime 	= 'N/A';
								$APPLICATION_copyright 	= 'N/A';

								$ts_VER = _ts_VER .''. _mxts_REL;
								$ts_STA = _mxts_STA;

								$cfg_FILE = '??????????';
								if ( file_exists( $cfg_FILE ) ) {

								require_once( $cfg_FILE );
								$discovered_CFG = '1';

								// configuration file not found... Pre-Install check assumed...	
								} else {
									$discovered_CFG = '0';
									$discovered_APP = 'preinstall';
									}

								// Must be e107 .7
								} else if ( file_exists( '../e107_admin/ver.php' ) ) {

								define( 'e107_INIT', 1 );

									require_once( '../e107_admin/ver.php' );

									$content = file_get_contents( '../e107_admin/ver.php', FILE_TEXT);
							        preg_match('#\|\s(.*) website system#', $content, $e107_NAME);
							        preg_match('#Date: (.*) \$#', $content, $e107_RELDATE);

									$APPLICATION_product 	= substr( $e107_NAME[1], 4, 6 );
									$APPLICATION_version 	= $e107info['e107_version'];
									$APPLICATION_devstatus 	= 'N/A';
									$APPLICATION_devlevel 	= 'N/A';
									$APPLICATION_build 		= 'N/A';
									$APPLICATION_codename 	= 'N/A';
			  						$APPLICATION_reldate 	= substr( $e107_RELDATE[1], 0, 10 );
									$APPLICATION_reltime 	= 'N/A';
									$APPLICATION_copyright 	= 'N/A';

									$ts_VER = _ts_VER .''. _ets_REL;
									$ts_STA = _ets_STA;

									$cfg_FILE = '../e107_config.php';
									if ( file_exists( $cfg_FILE ) ) {

									require_once( $cfg_FILE );
									$discovered_CFG = '1';

									// configuration file not found... Pre-Install check assumed...	
									} else {
										$discovered_CFG = '0';
										$discovered_APP = 'preinstall';
										}

									// Either we couldn't find an application or it's a Pre-Installation run						
									} else {
						
										$APPLICATION_product 	= 'Pre-Install Check';
										$APPLICATION_version 	= 'N/A';
										$APPLICATION_devstatus 	= 'N/A';
										$APPLICATION_devlevel 	= 'N/A';
										$APPLICATION_build 		= 'N/A';
										$APPLICATION_codename 	= 'N/A';
										$APPLICATION_reldate 	= 'N/A';
										$APPLICATION_reltime 	= 'N/A';
										$APPLICATION_copyright 	= 'N/A';

										$discovered_APP 		= 'preinstall';
										if ( $discovered_CFG != '1' ) {
											$discovered_CFG = '0';
											}

										// Displays the basic Tools Suite Version/Revision information
										$ts_VER = _ts_VER .''. _ts_REL;
										$ts_STA = _ts_STA;
										}

?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title><?php echo $APPLICATION_product .' '. _ts_PRODUCT; ?></title>

	<link rel="shortcut icon" href="css/images/favicon.ico" />

	<!--// Include the menu system //-->
	<script type="text/javascript" src="menu/jquery-1.2.2.pack.js"></script>
	<script type="text/javascript" src="menu/ddaccordion.js"></script>

	<script type="text/javascript">

		ddaccordion.init({
			headerclass: "silverheader", //Shared CSS class name of headers group
			contentclass: "submenu", //Shared CSS class name of contents group
			revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
			collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
			defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
			onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
			animatedefault: false, //Should contents open by default be animated into view?
			persiststate: false, //persist state of opened contents within browser session?
			toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
			togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
			animatespeed: "normal", //speed of animation: "fast", "normal", or "slow"
			oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
				//do nothing
			},
			onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
				//do nothing
			}
		})

	</script>

	<link href="css/toolssuite2.css" rel="stylesheet" type="text/css" />

</head>

<body>

<!--// BEGIN Tools Suite headings //-->
<table border="0" cellpadding="0" cellspacing="5" width="850" align="center">
<tr>
	<td width="690" valign="top">

	<!--// Tools Suite main heading //-->
	<div class="toolssuite-style1-color1" style="width: 100%;">
		<div>
			<div>
				<div style="height: 78px;">

					<h3 style="visibility: visible;"><span><?php echo _ts_DEVELOPER; ?></span> <?php echo _ts_PRODUCT; ?></h3>
					<?php
						// Application and Tools Suite version determination

							if ( $APPLICATION_product == "Joomla!" ) {
								$discovered_APP = substr( $APPLICATION_product, 0, 6 );

								} else if ( $APPLICATION_product != 'Joomla!' && $APPLICATION_product != 'Pre-Install Check' ) {
									$discovered_APP = $APPLICATION_product;

									} else {
									// oops, we couldn't find an application. Post "missing" and refer later messages
										$discovered_APP = 'preinstall';

										$dashmsg_MESSAGE .= '<p class="message">'. _dashmsg_PREINSTALL .'</p>';
										$msgctr_NOTICE  .= '<p class="notice">TSN-'. _msgctr_PREINSERR .'</p>';
										}

					?>


<?php
	// Set development status and highlight any application with a pre-release status
	if ( ( stristr( $APPLICATION_version, 'dev' ) ) || ( stristr( $APPLICATION_version, 'rc' ) ) || ( stristr( $APPLICATION_version, 'alpha' ) ) || ( stristr( $APPLICATION_version, 'beta' ) ) || ( stristr( $APPLICATION_devlevel, 'rc' ) ) || ( stristr( $APPLICATION_devlevel, 'alpha' ) ) || ( stristr( $APPLICATION_devlevel, 'beta' ) ) || ( stristr( $APPLICATION_devstatus, 'alpha' ) ) || ( stristr( $APPLICATION_devstatus, 'beta' ) ) || ( stristr( $APPLICATION_build, 'alpha' ) ) || ( stristr( $APPLICATION_build, 'beta' ) ) || ( stristr( $APPLICATION_build, 'rc' ) ) ) {
								
		$msgctr_WARNING .= '<p class="warning">TSW-'. _msgctr_APPINDEV .'</p>';
		$actmsg_MESSAGE .= '<p class="action">TSA-'. _actmsg_DEVAPPACT .'</p>';
		$status_DEVSTAT .= '<p class="status_no">'. _status_APPDEV .'</p>';

		$devstatus_FLAGCOLOR	= '#680000';
		$devstatus_FLAGINDEV	= '<font size="-3" color="'. $devstatus_FLAGCOLOR .'">Development</font>';
		} else { 
			
			// Set a different flag for Pre-Install cases
			if ( $discovered_APP == 'preinstall' ) {
				$devstatus_FLAGCOLOR	= '#004080';
				$devstatus_FLAGINDEV	= '<font size="-3" color="'. $devstatus_FLAGCOLOR .'">Pre-Install';
				} else {
					$devstatus_FLAGCOLOR	= '#516503';
					$devstatus_FLAGINDEV	= '<font size="-3" color="'. $devstatus_FLAGCOLOR .'">Production';
					$status_DEVSTAT .= '<p class="status_yes">'. _status_APPPROD .'</p>';
					}

			$devstatus_FLAGINDEV 	.= '</font>';
			}	
?>

						<!--// Post the application logo and Tools Suite version //-->
						<table border="0" cellpadding="0" cellspacing="2" width="580">
						<tr>
							<td rowspan="3" valign="top" align="center" width="70px" style="margin: 0; padding: 0;">

								<!--// Include the discovered application logo //-->
								<img border="0" style="margin: 0; padding: 0;" src="css/images/<?php echo strtolower( $discovered_APP ); ?>_64.png" width="64" height="64">

								<!--// Display and highlight the discovered App's development status //--> 
								<?php echo $devstatus_FLAGINDEV; ?>

							</td>
							<td rowspan="3" width="20px" height="74px">&nbsp;</td>
							<td class="cell_head_titles"><strong>Product</strong></td>
							<td class="cell_data"><strong><?php echo $APPLICATION_product; ?></strong></td>
							<td class="cell_head_titles"><span class="applemenu_span">Codename</span></td>
							<td class="cell_data"><?php echo $APPLICATION_codename; ?></td>
						</tr>
						<tr>
							<td class="cell_head_titles"><strong>Version</strong></td>
							<td class="cell_data" style="color: <?php echo $devstatus_FLAGCOLOR; ?>">
								<strong>
								
								<?php 

									echo $APPLICATION_version;

									// Hide the "." and devlevel if they don't exist
									if ($APPLICATION_devlevel != '' && $APPLICATION_devlevel != "N/A") {
							 			echo ".". $APPLICATION_devlevel; 
								 		}
							 	?>
							 	
							 	</strong>
							 </td>
							<td class="cell_head_titles">Status/Package</td>
							<td class="cell_data" style="color: <?php echo $devstatus_FLAGCOLOR; ?>"><?php echo $APPLICATION_devstatus; ?></td>
						</tr>
						<tr>
							<td class="cell_head_titles">Release Date</td>
							<td class="cell_data"><?php echo $APPLICATION_reldate; ?></td>
							<td class="cell_head_titles">Build/Compat</td>
							<td class="cell_data" style="color: <?php echo $devstatus_FLAGCOLOR; ?>"><?php echo $APPLICATION_build; ?></td>
						</tr>
						</table>

				</div>
			</div>
		</div>
	</div>
	
	</td>
	<td width="160" valign="top">






	<!--// Tools Suite version & application discovery heading //-->
	<div class="module-style1-color1" style="width: 100%;">
		<div>
			<div>
				<div style="height: 78px;">
	
					<h3 style="visibility: visible; align: center; text-align: center;"><span><?php echo _ts_PRODUCT; ?></span> version</h3>
					<div class="module-text-title" style="text-align: center; vertical-align: top;">

						<img src="css/images/tools_48.png" height="48" width="48">
						<div class="module-text">

						<?php 
						echo '<br />'. $ts_VER .' '. $ts_STA .'<br/>'. _ts_PRD .''; ?>

						</div>
					</div>

				</div>
			</div>
		</div>
	</div>


	</td>
</tr>
</table>
<!--// END Tools Suite headings //-->






<!--// BEGIN Tools Suite main content //-->
<table border="0" cellpadding="0" cellspacing="0" width="850" align="center">
<tr>
	<td valign="top" width="690">



						<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
						<tr>

						<?php if ( ( $_GET[opt] == '' ) || ( $_GET[opt] == 'ats' ) ) { ?>

							<td width="50%" style="padding-top: 5px; padding-bottom: 5px; padding-right: 5px;" valign="top">

						<?php } ?>


							<div class="module-style1-color3" style="height: 100%; min-height: 550px;">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%; min-height: 550px;">	

										<?php 
										if ( $_GET[opt] == '' ) {

											include ( 'assets/ts_assessment.php' );

										} else if ( $_GET[opt] == 'ats' ) {

											include ( 'assets/ts_help_contrib.php' );

										}
										?>

										</div>
									</div>
								</div>
							</div>

							<br />

						<?php if ( ( $_GET[opt] == '' ) || ( $_GET[opt] == 'ats' ) ) { ?>

							</td>
							<td style="padding: 5px;" valign="top" width="50%">

						<?php } ?>

							<div class="module-style1-color3" style="height: 100%; min-height: 550px;">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%; min-height: 550px;">	

										<?PHP
										if ( $_GET[opt] == '' ) {

											include ( 'assets/ts_discovery.php' );

										} else if ( $_GET[opt] == 'ats' ) {

											include ( 'assets/ts_help_about.php' );

										}
										?>

										</div>
									</div>
								</div>
							</div>	
							

						<?php if ( $_GET[opt] == '' ) { ?>

							</td>						
						
						<?php } ?>

						</tr>




						<tr>
							<td style="padding: 5px;" valign="top" width="50%">
							

						<?php if ( $_GET[opt] == '' ) { ?>

							<div class="module-style1-color3">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%;">	
										<h3 style="visibility: visible; text-align: center;"><span><?php echo _MESSAGE; ?></span> <?php echo _CENTRE; ?></h3>

										<div style="font-size: 11px; font-family: optima, arial, calibri, helvetica;">

											<!--// Post any messages //-->
											<?php

													if ( !$msgctr_ERROR ) {
														echo '<b>Messages</b><br /><p class="success">TSM-<b>0000:</b> No messages to display</p>';
														} else {
															echo '<b>Messages</b><br />'. $msgctr_MESSAGE;
															}


													if ( !$msgctr_ERROR ) {
														echo '<b>Errors</b><br /><p class="success">TSE-<b>0000:</b> No errors to display</p>';
														} else {
															echo '<b>Errors</b><br />'. $msgctr_ERROR; 															
															}

													if ( !$msgctr_WARNING ) {
														echo '<b>Warnings</b><br /><p class="success">TSW-<b>0000:</b> No warnings to display</p>';
														} else {
															echo '<b>Warnings</b><br />'. $msgctr_WARNING; 
															}

													if ( !$msgctr_NOTICE ) {
														echo '<b>Notices</b><br /><p class="success">TSN-<b>0000:</b> No notices to display</p>';
														} else {
															echo '<b>Notices</b><br />'. $msgctr_NOTICE;
															}

											?>
										</div>

										</div>
									</div>
								<div>
							</div>	
						<?php } ?>														

							</td>

							<td style="padding: 5px;" valign="top" width="50%">

						<?php if ( $_GET[opt] == '' ) { ?>

							<div class="module-style1-color3">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%;">	
										<h3 style="visibility: visible; text-align: center;"><span><?php echo _ACTIVITY; ?></span> <?php echo _CENTRE; ?></h3>

												<h4 style="visibility: visible; margin-bottom: 0px;"><span class="discovery_head_span"><?php echo _ACTIVITY; ?></span> <?php echo _CENTRE .' '. _MESSAGES; ?></h4>
											<?php
////												include ( 'assets/ts_assessment.php' );

												if ( ( $discovered_CFG == '0') || ( $discovered_APP == 'preinstall' ) ) {
													$actmsg_MESSAGE .= '<p class="action">TSA-'. _actmsg_PREINSACT .'</p>';												
													}
											?>
<!--//
												<br /><br clear="all">

												<h4 style="visibility: visible; margin-bottom: 0px;"><span class="discovery_head_span"><?php echo _ACTIVITY; ?></span> <?php echo _CENTRE .' '. _MESSAGES; ?></h4>
//-->
											<?php
												echo ''. $actmsg_MESSAGE;
											?>

										</div>
									</div>
								<div>
							</div>

</td>

						</tr>

						<?php } ?>
						</table>
						

	
	</td>

	<td valign="top" width="160" height="370px">

	<div class="module-style2-color2" style="height: 370px; padding-top: 5px;">
		<div style="height: 100%;">
			<div style="height: 100%;">
				<div style="height: 100%;">	

				<!--// BEGIN NEW MENU //-->
				<div class="applemenu">
			
					<div class="silverheader"><a href="#"><span class="applemenu_span"><?php echo _ts_PRODUCT; ?></span> Discovery</a></div>
						<div class="submenu">
							<a href="index.php">Basic Discovery</a><br />
						</div>

					<div class="silverheader"><a href="#"><span class="applemenu_span">Application</span> Health</a></div>
						<div class="submenu">
							Some random content here<br />
						</div>

					<div class="silverheader"><a href="#"><span class="applemenu_span">Environment</span> Audit</a></div>
						<div class="submenu">
							Some random content here<br />
						</div>
	
					<div class="silverheader"><a href="#"><span class="applemenu_span">Hosting</span> Environment</a></div>
						<div class="submenu">
							Some random content here<br />
						</div>

					<div class="silverheader"><a href="#"><span class="applemenu_span">Problem</span> Reporting</a></div>
						<div class="submenu">
							Some random content here<br />
						</div>		

					<div class="silverheader"><a href="#"><span class="applemenu_span">About</span> Tools Suite</a></div>
						<div class="submenu">
							<a href="index.php?opt=ats">About Tools Suite</a><br />
						</div>		
			
				</div>
				<!--// END NEW MENU //-->

				</div>
			</div>
		</div>
	</div>
	



							<div class="module-style1-color1">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%;">	

										<h3 style="visibility: visible; text-align: center;"><span><?php echo _ts_PRODUCT; ?></span> <?php echo _STATUS; ?></h3>


											<div style="font-size: 11px; font-family: optima, arial, calibri, helvetica;">
											<?php

											// Configuration Status
											if ( ( $discovered_APP != 'preinstall' ) && ( $discovered_CFG == '0' ) ) {
												// Found application but not configuration
												$status_CFGSTAT .= '<p class="status_yes">'. _status_APPFOUND .'</b></p>';
												$status_CFGSTAT .= '<p class="status_yes">'. _status_POSINSTALL .'</p>';			
												$status_CFGSTAT .= '<p class="status_no">'. _status_CFGNFND .'</p>';
												$status_CFGSTAT .= '<p class="status_yes">'. _status_PRECONFIG .'</p>';							

												} else if ( ( $discovered_APP == 'preinstall') && ( $discovered_CFG == '0' ) ) {
													// Didn't find application or configuration
													$status_CFGSTAT .= '<p class="status_no">'. _status_APPNFOUND .'</p>';
													$status_CFGSTAT .= '<p class="status_yes">'. _status_PREINSTALL .'</p>';			
													$status_CFGSTAT .= '<p class="status_no">'. _status_CFGNFND .'</p>';
													$status_CFGSTAT .= '<p class="status_yes">'. _status_PRECONFIG .'</p>';							

													} else {
													// Found application and configuraiton
													$status_CFGSTAT .= '<p class="status_yes">'. _status_APPFOUND .'</b></p>';
													$status_CFGSTAT .= '<p class="status_yes">'. _status_POSINSTALL .'</p>';			
													$status_CFGSTAT .= '<p class="status_yes">'. _status_CFGFND .'</p>';
													$status_CFGSTAT .= '<p class="status_yes">'. _status_POSCONFIG .'</p>';							

//													$status_CONFIG .= '<p class="status_yes">'. _status_APPDEV .'</p>';

//														$status_CONFIG .= '<p class="status_yes">'. _status_APPFOUND .'</b></p>';
//														$status_CONFIG .= '<p class="status_yes">'. _status_CFGFND .'</p>';						
//														$status_CONFIG .= '<p class="status_yes">'. _status_POSINSTALL .'</p>';						
														}

	
//											echo '<b>Configuration</b><br />';
											echo '<b>Configuration</b><br />'. $status_CFGSTAT;
											echo $status_DEVSTAT;										

											?>
											</div>

										</div>
									</div>
								</div>
							</div>


							<?php
								if ( $extended_INFO == '1' ) {
							?>

							<div class="module-style1-color1">
								<div style="height: 100%;">
									<div style="height: 100%;">
										<div style="height: 100%;">	

										<h3 style="visibility: visible; text-align: center;"><span><?php echo _EXTENDED; ?></span> <?php echo _STATUS; ?></h3>


											<div style="font-size: 11px; font-family: optima, arial, calibri, helvetica;">

											<?php include ( 'assets/ts_ext_status.php' ); ?>

											</div>

										</div>
									</div>
								</div>
							</div>
							<?php } ?>

	</td>
</tr>
<tr>
	<td valign="top" style="padding-right: 5px;">
	
	<!--// BEGIN openVISION Footer //-->	
	<div class="module-style2-color1">
		<div>
			<div>
				<div style="height: 100px;">

					<h3 style="visibility: visible; font-size: 10px;"><span>Icon</span> legends</h3>

					<table border="0" cellpadding="5" cellspacing="0">
					<tr>
						<td width="16%" valign="top"><p class="success" style="font-size: 10px; border: none;"><b>Succeses</b><br />describes correctly configured or healthy items.</p></td>
						<td width="16%" valign="top"><p class="message" style="font-size: 10px; border: none;"><b>Messages</b><br />messages to aid problem or configuration determination.</p></td>
						<td width="16%" valign="top"><p class="notice" style="font-size: 10px; border: none;"><b>Notices</b><br />notifications of anomolies or configuration issues.</p></td>
						<td width="16%" valign="top"><p class="warning" style="font-size: 10px; border: none;"><b>Warnings</b><br />possible issues that may effect  site operation.</p></td>
						<td width="16%" valign="top"><p class="error" style="font-size: 10px; border: none;"><b>Errors</b><br />items that are very likely to cause site issues.</p></td>
						<td width="16%" valign="top"><p class="action" style="font-size: 10px; border: none;"><b>Actions</b><br />activities that may be undertaken to overcome issues.</p></td>
					</tr>
					</table>

				</div>
			</div>
		</div>
	</div>
	<!--// END openVISION Footer //-->

	</td>
	<td valign="top">
	
	<!--// BEGIN openVISION BackLink //-->	
	<div class="module-style2-color1">
		<div>
			<div>
				<div style="height: 100px;">

					<h3 style="visibility: visible; font-size: 10px; text-align: center;"><span><?php echo _ts_DEVELOPER; ?></span> <?php echo _ts_PRODUCT; ?></h3>
						<div class="module-text" style="font-size: 9px;" align="center" valign="middle">
							<a href="http://openvision.net.au" target="_ov"><img src="css/images/ovlogo_small.png" height="35" width="53" align="center"></a>
							<br clear="all"><br />
							Find out more at<br /><a href="http://openvision.net.au" target="_ov"><?php echo _ts_DEVELOPER; ?></a>
						</div>

				</div>
			</div>
		</div>
	</div>
	<!--// END openVISION BackLink //-->
	
	</td>
</tr>
</table>



<div style="text-align: center; font-size: 10px;">
	<p>
		<?php echo _ts_COPYRIGHT ."<br />". _ts_DEVELOPER ." ". _ts_PRODUCT ." ". _ts_LICENSE; ?><br /><br />
	</p>

</div>

<?php
	if ( $debug == "1" ) {

		echo '<br /><table width="850" align="center" border="0"><tr><td><div style="font-size: 11px; border: 1px solid #808080; width: 850; padding-left: 50px; padding-top: 10px; padding-bottom: 10px;">';

		echo '<b>DEGUG</b><br />';
		echo '<b>Product Discovered:</b> '. $discovered_APP .' ( '. $APPLICATION_version .' )<br />';
		echo '<b>Config File Found:</b> '. $discovered_CFG .'<br />';
		echo '<b>CFG File Expected:</b> '. $cfg_FILE .'<br />';

		echo '</div></td></tr></table>';
	}
?>

</body>
</html>